import request from '@/utils/request'
import cache from "@/plugins/cache";

// 查询属性值回显列表
export function listSub(query) {
  return request({
    url: '/system/sub/list',
    method: 'get',
    params: query
  })
}

// 查询属性值回显详细
export function getSub(subid) {
  return request({
    url: '/system/sub/' + subid,
    method: 'get'
  })
}

// 新增属性值回显
export function addSub(data) {
  return request({
    url: '/system/sub',
    method: 'post',
    data: data
  })
}

// 修改属性值回显
export function updateSub(data) {
  return request({
    url: '/system/sub',
    method: 'put',
    data: data
  })
}

// 删除属性值回显
export function delSub(subid) {
  return request({
    url: '/system/sub/' + subid,
    method: 'delete'
  })
}

export function getDbName() {
  return cache.local.get("currentProject");
}
